package com.atguigu.order.feign;

import com.atguigu.order.config.OrderConfig;
import com.atguigu.order.feign.fallback.ProductFeignClientFallBack;
import com.atguigu.product.bean.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

//远程调用客户端
@FeignClient(value = "server-product",fallback = ProductFeignClientFallBack.class)
public interface ProductFeignClient {

    @GetMapping("/product/{id}")
    public Product getProduct(@PathVariable(value = "id") long productId) ;
}
